<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="/page/comm/comm.jsp" %>
<html>
<body>
 <script type="text/javascript">
 	var logindialog;
 	$(function(){
 		logindialog=$("#login").dialog({
 			closable:false,
 			modal:true
 		});
 	});
 </script>
 <div id="login" title="登录" style="width:400px;height:200px;">
 <form id="logins">
 <table>
 	<tr>
 	<td>用户名：</td>
 	<td><input type="text" name="usertem.userName" value="1" /></td>
 	</tr>
 	<tr>
 	<td>密码：</td>
 	<td><input type="password" name="usertem.passWord"  value="1" /></td>
 	</tr>
 	<tr>
 	<tr>
 	<td>验证码：</td>
 	<td> <input type="code" name="code"   /> <img alt="" src="mUserAction!genradomCodeImage.action"></td>
 	</tr>
 	<tr>
 		<td>
 		<input type="button" value="登录" onclick="login()"/>
 		</td>
 	</tr>
 </table>
 </form>
 </div>
 <script type="text/javascript">
 	function login(){
 		$.ajax({
 			url:'mUserAction!login.do',
 			type:'post',
 			dataType:'json',
 			/* data:{
 				name:$("input[name='name']").val(),
 				pwd:$("input[name='password']").val() 
 			}, */
 			data:$("#logins").serialize(),
 			success:function(data){
 				if(data.dataMap.success){
					$.messager.alert("提示",data.dataMap.msg);
			 		window.location.href="userAction!toIndex.action";
				}else{
					$.messager.alert("提示",data.dataMap.msg);
				}
 			}
 		});
 	}
 </script>
</body>
</html>
